﻿/**********************************************************************
 * @file   GUISEASubSysPlateBaseDialog.h
 * @brief  创建板窗口父类
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-10-28
 *********************************************************************/
#ifndef _GUISEASubSysPlateBaseDialog_H
#define _GUISEASubSysPlateBaseDialog_H

#include "GUISEASubSysBaseDialog.h"

namespace Ui
{
    class GUISEASubSysPlateBaseDialog;
}

namespace Acoustics
{
    class FITKAbstractSEASubSysShell;
    class FITKAcousticsAbsNCT;
    class FITKAcousticsAbsPhysicsProp;
}

class QStandardItemModel;

namespace GUI
{
    /**
     * @brief FlatPlate create or edit widget
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-10-23
     */
    class GUISubSystemDialogAPI GUISEASubSysPlateBaseDialog :public GUISEASubSysBaseDialog
    {
        Q_OBJECT;
    public:
        /**
         * @brief create object
         * @param[i]  obj            My Param doc
         * @param[i]  oper           operator
         * @param[i]  parent
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        GUISEASubSysPlateBaseDialog(Acoustics::FITKAbstractSEASubSysShell* obj, Core::FITKActionOperator* oper, QWidget* parent = nullptr);
        /**
         * @brief Destroy object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        virtual ~GUISEASubSysPlateBaseDialog();

    protected slots:
        /**
         * @brief cencel button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief OK button clicked slot
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief    comboBox Construction currentIndexChanged slot
         * @param[i] index 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-10-24
         */
        void on_comboBox_Construction_currentIndexChanged(int index);
        /**
         * @brief    comboBox PhysicalProp currentIndexChanged slot
         * @param[i] index 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void on_comboBox_PhysicalProp_currentIndexChanged(int index);
        /**
         * @brief    comboBox Outside currentTextChanged slot
         * @param[i] currentString 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void on_comboBox_Outside_currentTextChanged(const QString & currentString);
        /**
         * @brief    comboBox Inside currentTextChanged slot
         * @param[i] currentString 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void on_comboBox_Inside_currentTextChanged(const QString & currentString);
        /**
         * @brief    checkBox From user-defined structural DLF spectra currentIndexChanged slot
         * @param[i] state 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-04
         */
        void on_checkBox_FromDLF_stateChanged(int state);
        /**
         * @brief    checkBox Correction for Sub-Divided Panels State change
         * @param[i] state 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void on_checkBox_SubDividedPanel_stateChanged(int state);
        /**
         * @brief    checkBox Flexure Modal Density State change
         * @param[i] state 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void on_checkBox_PlexureMDen_stateChanged(int state);
        /**
         * @brief    checkBox Extension Modal Density State change
         * @param[i] state 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void on_checkBox_ExtensionModalDen_stateChanged(int state);
        /**
         * @brief    checkBox Shear Modal Density State change
         * @param[i] state 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-01
         */
        void on_checkBox_ShearModelDen_stateChanged(int state);

    protected:
        /**
         * @brief    获取创建数据对象的名称
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-11
         */
        virtual QString getCreateDataObjName() = 0;
        /**
         * @brief    初始化物理属性类型过滤器
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initShellData();
        /**
         * @brief    初始化物理属性类型过滤器下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initConstructionData();
        /**
         * @brief    初始化损耗因子下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-04
         */
        void initDampingData();
        /**
         * @brief    初始化物理属性下拉列表
         * @param[i] type 
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initPhysicalPropData(int type);
        /**
         * @brief    初始化声学包下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initNCTData();
        /**
         * @brief    初始化模态密度的下拉列表
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initModelDensityData();
        /**
         * @brief    初始化物理属性和方向
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-08
         */
        virtual void initPropOrienData();
        /**
         * @brief    初始化几何数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initGeometryData();
        /**
         * @brief    初始化波数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-07
         */
        void initRadiationWave();
        /**
         * @brief    初始化窗口组件
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-10-24
         */
        virtual void initComponent() = 0;
        /**
         * @brief    Get the Data Form Widget object
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-10-24
         */
        virtual void getDataFormWidget();
        /**
         * @brief    Get Name Form Widget
         * @return   QString
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-28
         */
        QString getNameFormWidget() override;
        /**
         * @brief    获取物理属性质量
         * @param[i] phyPropData 物理属性数据对象
         * @return   double
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-11
         */
        double getPhysicsPropMass(Acoustics::FITKAcousticsAbsPhysicsProp* phyPropData);
        /**
         * @brief    获取声学包质量
         * @param[i] nctData 
         * @return   double
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-11-11
         */
        double getNCTMass(Acoustics::FITKAcousticsAbsNCT* nctData);

    protected:
        /**
         * @brief ui object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-10-23
         */
        Ui::GUISEASubSysPlateBaseDialog* _ui = nullptr;
        /**
         * @brief  模型节点表格
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-11
         */
        QStandardItemModel* _tableView_modelNodes{};
        /**
         * @brief  自由阻尼板的数据表格
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-11-11
         */
        QStandardItemModel* _tableView_modelGeneralLaminate{};
    };
}

#endif
